<template>
	<view class="info">
		<view class="box" @click="gotoSetting">
			<view class="box-left">
				<image :src="groupData.head"></image>
			</view>
			<view class="box-center">
				<view class="title">
					<text>{{groupData.nickname}}</text>
				</view>
				<view class="detail">
					<text>{{groupData.describe != null ? groupData.describe : '暂未设置家族介绍'}}</text>
				</view>
			</view>
			<view class="box-right">
				<image :src="goSet"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['groupData'],
		data() {
			return {
				goSet: require('@/static/img/main/my/userinfo/01.svg'),
			}
		},
		methods: {
			gotoSetting() {
				uni.navigateTo({
					url: '/subpkg/msg/set/set-group/set-group-data/set-group-data?groupId=' +
						this.groupData.id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.info {
		width: 100%;
		background-color: #ffffff;
	}

	.box {
		width: 94%;
		margin-left: 3%;
		// height: 160rpx;

		padding: 20rpx 0;
		display: flex;
		justify-content: space-between;
		border-top: 1rpx solid rgba(229, 229, 229, 1);
		// border-bottom: 1rpx solid rgba(229, 229, 229, 1);
		margin-bottom: 20rpx;

		.box-left {
			width: 20%;
			text-align: center;

			image {
				width: 90rpx;
				height: 90rpx;
				border-radius: 50%;
			}
		}

		.box-center {
			width: 70%;

			text {
				//文字不允许换行（单行文本）
				white-space: nowrap;
				//溢出部分隐藏
				overflow: hidden;
				//文本溢出后，使用。。。代替
				text-overflow: ellipsis;
			}

			.title {
				margin-left: 10%;

				text {
					color: rgba(0, 0, 0, 1);
					font-size: 40rpx;
					font-weight: 500;
				}
			}

			.detail {
				margin-left: 10%;

				text {
					color: rgba(166, 166, 166, 1);
					font-size: 26rpx;
					font-weight: 500;
				}
			}

		}

		.box-right {
			// margin-top: 75rpx;
			margin-top: 20rpx;

			image {
				width: 50rpx;
				height: 50rpx;
			}
		}
	}
</style>